package com.stefanbertos.tapestry.components;

import org.apache.tapestry5.annotations.Parameter;

/**
 * Confirmation dialog.
 * 
 * @author stefan
 * 
 */
public class ConfirmDialog extends AbstractDialog {

    /**
     * Dialog message, displayed in the center of the dialog box.
     */
    @Parameter(required = true)
    private String message;

    /**
     * Type of the dialog, icon shown in the left of the message is dependent on
     * this type.
     */
    @Parameter(required = false, value = "NONE")
    private DialogType type;

    /**
     * Enum for dialog type.
     * 
     * @author stefan
     * 
     */
    public enum DialogType {
        /** Warning dialog. */
        WARN,
        /** Info dialog. */
        INFO,
        /** Error dialog. */
        ERROR,
        /** Default type. */
        NONE
    }

    /**
     * Default constructor.
     */
    public ConfirmDialog() {
        super();
    };

}
